package cn.tedu.csmall.passport.service.impl;

import cn.tedu.csmall.passport.mappers.RoleMapper;
import cn.tedu.csmall.passport.pojo.vo.RoleItemListVo;
import cn.tedu.csmall.passport.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Iterator;
import java.util.List;
@Service
public class IRoleServiceImpl implements IRoleService {
    @Autowired
    RoleMapper roleMapper;
    public List<RoleItemListVo> list() {
        List<RoleItemListVo> list = roleMapper.list();
        Iterator<RoleItemListVo> iterator = list.iterator();
        while (iterator.hasNext()){
            RoleItemListVo role = iterator.next();
            if(role.getId()==1){
                iterator.remove();
            }
        }
        return list;
    }
}
